package com.example.repair.model

import com.example.net.RetrofitUtils
import com.example.repair.api.RepairApiService
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

@Qualifier
@Retention(AnnotationRetention.BINARY)
annotation class Repair{

}
@Module
@InstallIn(SingletonComponent::class)
class RepairWorkModel {
    @Repair
    @Provides
    @Singleton
    fun provideHouseworkModel(): Retrofit {
        return RetrofitUtils.getRetrofit()
    }
    @Provides
    @Singleton
    fun provideHouseworkApi(@Repair retrofit: Retrofit): RepairApiService {
        return  retrofit.create(RepairApiService::class.java)
    }
}